const express=require('express')
const report= express.Router()

const axios=require('axios')

report.get('/report/article',(req,res)=>{
    let {pageNow,pageSize}=req.query
    axios({
        method:'get',
        url:'/Admin/Report/queryForAdmin',
        params:{
            pageNow:pageNow||1,
            pageSize:pageSize||6,
            reportState:0,
            reportType:0//0为文章，1为评论，2
        },
        headers: {
            'Content-Type':'application/x-www-form-urlencoded',
            token:(req.session.token?req.session.token:'')
        },
    }).then(data=>{
        res.status(200).json({
            key:data.data
        })
    }).catch(err=>{
        res.status(500).json({
            err:err
        })
    })
})

module.exports=report